export{}

const screenResume1 = (name: string, age: number, bust: number) => {
    age < 24 && bust >= 90 && console.log(name + '进入面试');
    age >= 24 || bust < 90 && console.log(name + '你被淘汰');
}

screenResume1('girl', 18, 89)

const getResume1 = (name: string, age: number, bust: number) => {
    console.log(name + '年龄是' + age);
    console.log(name + '胸围是' + bust);
}

getResume1('girl', 18, 90)

interface Girl {
    name: string,
    age: number,
    bust: number
    waistline ?: number,
    [propname: string]: any,
    say(): string
}

class woman implements Girl {
    name = 'john';
    age = 18;
    bust = 90;
    say() {
        return 'hello world';
    };
}

const girl = {
    name: 'mike',
    age: 18,
    bust: 90,
    waistline: 21,
    sex: 'girl',
    say() {
        return 'hello world'
    },
    teach() {
        return 'teach you'
    }
}

const screenResume2 = (girl: Girl) => {
    girl.age < 24 && girl.bust >= 90 && console.log(girl.name + '进入面试');
    girl.age >= 24 || girl.bust < 90 && console.log(girl.name + '你被淘汰');
}

const getResume2 = (girl: Teacher) => {
    console.log(girl.name + '年龄是' + girl.age);
    console.log(girl.name + '胸围是' + girl.bust);
    girl.waistlin && console.log(girl.name + '腰围是' + girl.waistline);
    girl.sex && console.log(girl.name + '性别是' + girl.sex);
    console.log(girl.teach());
}

screenResume2(girl)
getResume2(girl)

interface Teacher extends Girl{
    teach(): string;
}